<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * Smarty {custom_bgcolor} function plugin
 *
 * Type:     function<br>
 * Name:     custom_bgcolor <br>
 *           the passed parameters
 *      (Smarty online manual)
 * @author Bhatu Pawar <bhatupawar85 at gmail dot com>
 * @param array
 * @param Smarty
 * @return string

 */
function smarty_function_custom_bgcolor($params, &$smarty)
{
    //require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
	
	require_once DOC_ROOT."/model/website.php";

	$webObj = new Model_Website();	

	// Site Color
	$web_site_color_attributeArray = $webObj->getWebsiteAttribute_value($_SESSION[MY_SITE]['current_site_id'], 1);
	//print_r($web_button_color_attributeArray);
	$web_site_color_attribute = $web_site_color_attributeArray["attribute_value"] ;

	$site_color  = "$web_site_color_attribute;";

	return $site_color;
}

/* vim: set expandtab: */

?>
